home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ADA Programming Guide
/
ADA Programming Guide.iso
/
adatutor
/
cppwkbk
/
cppv2-6.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1996-01-30
|
553b
|
27 lines
#define HEADER "C++ Problem 2.6 by Rick Conn using Borland C++"
#include <stdio.h>
struct book {
char title[40];
char author[20];
};
void print_book (book &name)
{
printf(" Title: %s\n", name.title);
printf("Author: %s\n", name.author);
}
void main(void)
{
printf("%s\n", HEADER);
book textbook = { "Turbo C++ DiskTutor",
"Voss & Chui" };
book refbook = { "The Annotated C++ Reference Manual",
"Ellis & Stroustrup" };
print_book (textbook);
print_book (refbook);
}